<?
Abstract Class Controller_Auth 
{
        protected $registry;
		
		private function check_user()
		{
			if(!session_is_registered("neb_username")){
				header("location:/");
				exit;
			}else{
				return 1;
			}
		}
		
        function __construct($registry) 
        {
            $this->registry = $registry;
			$this->registry['template']->set('campos_site', $this->registry['lingua']->CarregarIdioma());
			$idiomas = $this->registry['lingua']->get_linguas_disponiveis();
			$this->registry['template']->set('idiomas', $idiomas);
			$this->check_user();
        }
        
		
		
        abstract function index();
}
?>